package com.bean;

import java.io.Serializable;

/**
 * /*收银时添加到购物车的实体类
 */
public class ShoppingCart implements Serializable {
    /*主键*/
    private Integer id;
    /*订单id*/
    private Long orderId;
    /*商品id*/
    private Integer productId;
    /*出售数量*/
    private Integer number;
    /*商品单价*/
    private Double unitPrice;
    /*含税进价*/
    private Double cost;
    /*单项商品金额小结*/
    private Double price;
    /*盈利*/
    private Double profit;
    /*单项商品状态有没有退货*/
    private Integer state;

    /*商品销售信息*/
    private Market market;


    public ShoppingCart() {
    }

    public ShoppingCart(Long orderId, Integer productId) {
        this.orderId = orderId;
        this.productId = productId;
    }

    public ShoppingCart(Long orderId, Integer productId, Integer number, Double unitPrice, Double cost, Double price, Double profit, Integer state) {
        this.orderId = orderId;
        this.productId = productId;
        this.number = number;
        this.unitPrice = unitPrice;
        this.cost = cost;
        this.price = price;
        this.profit = profit;
        this.state = state;
    }

    public ShoppingCart(Integer id, Long orderId, Integer productId, Integer number, Double unitPrice, Double cost, Double price, Double profit, Integer state) {
        this.id = id;
        this.orderId = orderId;
        this.productId = productId;
        this.number = number;
        this.unitPrice = unitPrice;
        this.cost = cost;
        this.price = price;
        this.profit = profit;
        this.state = state;
    }

    @Override
    public String toString() {
        return "ShoppingCart{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", productId=" + productId +
                ", number=" + number +
                ", unitPrice=" + unitPrice +
                ", cost=" + cost +
                ", price=" + price +
                ", profit=" + profit +
                ", state=" + state +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Double getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Double getCost() {
        return cost;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getProfit() {
        return profit;
    }

    public void setProfit(Double profit) {
        this.profit = profit;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Market getMarket() {
        return market;
    }

    public void setMarket(Market market) {
        this.market = market;
    }
}